'use strict';

var fs = require('fs');

var max=0;
var maxfile='';


for (let index =1; index <=3; index++) {
    
//写入随机文件和文本内容
    var num = Math.floor(Math.random()*(200-1+1)+1);//(max-min+1)+min
    var txt = ""+num+""
    fs.writeFileSync("./"+num+".txt",txt);


if (Number(txt)>max) {
    max = Number(txt);
    maxfile="./"+num+".txt";
}


}

console.log(maxfile);